<template>
	<div class="outer">
		<div class="tab-top">
			<div class="top-one">定期理财</div>
			<div class="top-two">超500,000+人购买</div>
		</div>
		<div class="tab-content">
			甄选金融机构优质产品，收益稳健、期限丰富。可挑选多款不同期限的产品。省心投资、安心持有。
		</div>
		<div class="title">
			<div class="title-son">
				<view class="">
					<text class="title-son-font">券商资管</text><text class="title-son-font2">天风天泽76天</text>
				</view>
				<view class="title-son-two">
					<text>明星产品</text>
				</view>
			</div>
			<div class="title-son2">
				<view class="son2-one">
					<view class="">
						<text>4.05</text><text class="small">%</text>
					</view>
					<view class="grey">
						业绩比较基础
					</view>
				</view>
				<view class="son2-two">
					<view class="">
						76天
					</view>
					<view class="grey2">
						5000元起购
					</view>
				</view>
				<view class="son2-three">
					<text class="qianggou">去抢购</text>
				</view>
			</div>
			<div class="son-bottom">
				<view class="bottom-son1">限时抢购</view>
				<view class="bottom-son1">无需开户</view>
			</div>
		</div>
		<div class="tab-bottom">
			<template v-for="(item,index) in arr">
				<div :class="[item.type?'active':'',index != 0?'itemlong':'']" :key="item.id" @click="bottomClick(item.id)">{{item.name}}</div>
			</template>

		</div>
		<div class="tab-bottom-title" v-for="(itm,index) in 5" :key="index" @click="details">
			<view class="bottom-title-son" >
				<text class="bottom-title-son-one">券商资管</text>
				<text class="bottom-title-son-one  bottom-title-son-two">齐鲁锦泉28天</text>
				<text class="bottom-title-son-three">限时抢购</text>
			</view>
			<view class="block-son-title">
				<view class="block-son">
					<view>
						<text class="block-son-text">3.05</text><text class="block-son-text2">%</text>
					</view>
					<view>
						<text class="grey">业绩比较基准</text>
					</view>
				</view>
				<view class="">
					<view class="">
						<text class="blod">28天</text>
					</view>
					<view>
						<text class="grey-bottom">券商出品 | 低风险</text>
					</view>
				</view>
			</view>
		</div>
		<div class="last">
			<text>没有合适的产品?去逛逛基金吧</text>
		</div>

	</div>
</template>

<script>
	export default {
		data() {
			return {
				arr: [{
						id: 0,
						name: "全部",
						type: true
					},
					{
						id: 1,
						name: "60天内",
						type: false
					},
					{
						id: 2,
						name: "60天-1年",
						type: false
					},
					{
						id: 3,
						name: "一年以上",
						type: false
					}
				]
			}
		},
		methods: {
			bottomClick(id) {
				console.log(id)
				this.arr.forEach(item => {
					if (item.id == id) {
						item.type = true;
					} else {
						item.type = false;
					}
				})
			},
			details(){
				uni.navigateTo({
					url:"./details"
				})
			}
		}
	}
</script>

<style>
	.outer {
		width: 710rpx;
		margin: 0 auto;
		background-color: #F8F8F8;
	}

	.tab-top {
		display: flex;
		justify-content: space-between;
		align-items: flex-end;
	}

	.top-one {
		font-size: 44rpx;
		color: #333333;
		font-weight: bold;
		margin-top: 30rpx;
	}

	.top-two {
		font-size: 24rpx;
		color: #333333;
	}

	.tab-content {
		margin-top: 40rpx;
		margin-bottom: 40rpx;
		font-size: 28rpx;
		color: #666666;
		letter-spacing: 22;
	}

	.title {
		background-color: #FFFFFF;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
	}

	.title-son {
		display: flex;
		justify-content: space-between;
	}

	.title-son-font,
	.title-son-font2 {
		font-size: 35rpx;
		font-weight: bold;
		margin-left: 30rpx;
	}

	.title-son-font2 {
		margin-left: 10rpx;
	}

	.title-son-two {
		position: relative;
		top: -16px;
		width: 140rpx;
		height: 44rpx;
		line-height: 44rpx;
		background-color: #f85656;
		color: #FFFFFF;
		text-align: center;
		font-size: 25rpx;
		border-top-right-radius: 12rpx;
		border-bottom-left-radius: 12rpx;
	}

	.title-son2 {
		display: flex;
		margin-top: 30rpx;
		justify-content: space-between;
	}

	.son2-one {
		font-size: 40rpx;
		color: #f85656;
		margin-left: 30rpx;
	}

	.son2-two {
		font-size: 32rpx;
		font-weight: bold;
	}

	.son2-three {
		width: 164rpx;
		height: 62rpx;
		border-radius: 32rpx;
		background-color: #3476f1;
		color: white;
		font-size: 30rpx;
		line-height: 62rpx;
		margin-right: 30rpx;
		background-image: url("../../static/image/guide/run.png");
		background-repeat: no-repeat;
		background-position: 21rpx 15rpx;
		background-size: 30rpx;
	}

	.grey {
		margin-top: 20rpx;
		font-size: 28rpx;
		color: #CCCCCC;
	}

	.grey2 {
		border: 1px solid transparent;
		margin-top: 30rpx;
		font-size: 28rpx;
		color: #CCCCCC;
		font-weight: normal;
		
	}

	.small {
		font-size: 25rpx;
	}

	.qianggou {
		margin-left: 55rpx;
	}

	.son-bottom {
		display: flex;
		margin-left: 30rpx;
	}

	.bottom-son1 {
		margin-top: 22rpx;
		width: 129rpx;
		height: 44rpx;
		background-color: #f9f2e8;
		color: #dbb885;
		font-size: 24rpx;
		text-align: center;
		line-height: 44rpx;
		margin-right: 20rpx;
	}

	.tab-bottom {
		display: flex;
		margin-top: 10rpx;
		background-color: white;
		padding-bottom: 15rpx;

	}

	.tab-bottom>div {
		width: 102rpx;
		height: 52rpx;
		line-height: 52rpx;
		text-align: center;
		/* border: 1px solid red; */
		font-size: 28rpx;
		border-radius: 8rpx;
		margin-right: 51rpx;
		margin-top: 30rpx;
		color: #CCCCCC;
	}

	.tab-bottom .active {
		background-color: #3476f1;
		color: white;
	}

	.tab-bottom-title {
		background-color: white;
		padding: 30rpx;
		border-bottom: 1px solid #F8F8F8;
		margin-top: 10rpx;
	}

	.bottom-title-son {
		margin-top: 30rpx;
	}

	.bottom-title-son-one {
		font-size: 35rpx;
		font-weight: bold;
		margin-left: 30rpx;
	}

	.bottom-title-son-two {
		margin-left: 10rpx;
	}

	.bottom-title-son-three {
		display: inline-block;
		width: 129rpx;
		height: 44rpx;
		background-color: #f9f2e8;
		color: #dbb885;
		font-size: 24rpx;
		text-align: center;
		line-height: 44rpx;
		margin-left: 20rpx;
	}

	.block-son-title {
		display: flex;
		margin-top: 30rpx;
	}

	.block-son {
		margin-left: 30rpx;
		margin-right: 152rpx;
	}

	.block-son-text {
		font-size: 40rpx;
		color: #F85656;
	}

	.block-son-text2 {
		font-size: 25rpx;
		color: #F85656;
	}

	.block-son-text3 {
		font-size: 32rpx;
	}

	.grey-bottom {
		font-size: 28rpx;
		position: relative;
		top: 12rpx;
		color: #CCCCCC;
	}

	.blod {
		font-size: 32rpx;
		font-weight: bold;
	}

	.last {
		color: #CCCCCC;
		margin: 40rpx auto;
		text-align: center;
	}
	.tab-bottom .itemlong{
		width: 150rpx;
	}
</style>
